www.gusucode.com > 环保时代家庭财务管理系统 EPffms v4.0 > 环保时代家庭财务管理系统 EPffms v4.0\code\eptimehome\smallclass_add.asp
<!-- #include file="conn.asp" --> <% '**************************************************** 'Code for EptimeFFMS 'Vision : v4.0 '**************************************************** %> <html> <head> <title><%=sitename%>-添加小类</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link href="images/admin.css" rel="stylesheet" type="text/css"> <style> body { background-color:#FFFFFF; } </style> </HEAD> <BODY> <%if request("hid1")="" then%> <script language="javascript"> function check() { if (document.form1.smallclass.value=="") { alert("有*号的必须填写!"); return false; } } </script> <form name="form1"> <table width="95%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED"> <tr> <td><img src="images/r_1.gif" alt="" /></td> <td width="100%" background="images/r_0.gif"> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td> 添加小类(带*号的为必填项)</td> <td align="right"> </td> </tr> </table> </td> <td><img src="images/r_2.gif" alt="" /></td> </tr> <tr> <td></td> <td> <table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1"> <tr> <td width="25%" height="30" align="right">所属大类:</td> <td width="75%" class="category"> <% sql="select * from Eptime_money_bigclass order by id" set rs_bigclass=conn.execute(sql) if rs_bigclass.eof then %> <script language=javascript> alert("请先添加大类!") window.location.href="bigclass_add.asp" </script> <% response.end else %> <select name="bigclass"> <% do while rs_bigclass.eof=false %> <option value="<%=rs_bigclass("id")%>"><%=rs_bigclass("bigclass")%></option> <% rs_bigclass.movenext loop %> </select> <% end if %> </td> </tr> <tr> <td height="30" align="right">小类名称:</td> <td class="category"> <input type="text" name="smallclass" style="width:300px"> <font color="#ff0000">*</font></td> </tr> <tr> <td height="30"> </td> <td class="category"> <input name="submit" type="submit" onClick="return check()" value=" 确 认 " class="button"> <input type="hidden" name="hid1" value="ok"> <input name="reset" type="reset" value=" 重新填写 " class="button"> </td> </tr> </table> </td> <td></td> </tr> <tr> <td><img src="images/r_4.gif" alt="" /></td> <td></td> <td><img src="images/r_3.gif" alt="" /></td> </tr> </table> </form> <% else nowbigclass=request("bigclass") nowsmallclass=request("smallclass") sql="select * from Eptime_money_smallclass where smallclass='"&nowsmallclass&"'" set rs=conn.execute(sql) if rs.eof=false then %> <script language="javascript"> alert("您输入的小类名已经存在!") window.history.go(-1) </script> <% response.end end if sql="insert into Eptime_money_smallclass(id_bigclass,smallclass) values("&nowbigclass&",'"&nowsmallclass&"')" conn.execute(sql) response.write"<script language=javascript>alert('小类添加成功!可以继续增加小类!');" response.write"javascript:history.go(-1)</script>" response.end end if %> </body> </html>